<?php ob_start();if(!isset($_SESSION)){
session_start();
}
require_once('Connections/microassur.php');require_once('utils/fonctions.php');?>
<?php 
mysql_select_db($database_microassur, $microassur);
if(isset($_GET['Identifiant_rib']))
{ 
mysql_query("START TRANSACTION");
$req=mysql_query("update contrat set Identifiant_rib='".$_GET['Identifiant_rib']."' where Numero_contrat='".$_SESSION['contrat']."'")or die(mysql_error());
if($req) { mysql_query("commit"); 
header("location: index.php?rattacher=1");
}
else { mysql_query("rollback");
header("location: index.php?rattacher=0");
}
}
?>